$(function (){
   let app = new Vue({
       el: "#app",
       data: {
           sysTitle: "固定资源管理系统",
           userID: "", //用户ID
           userName: "", //用户姓名
           userImageSrc: "", //用户头像
           userClass: "",  //用户类型
           userDepartment: "", //用户类型
           backImageSrc: "images/common/back.jpg",
           subList1: [
               {href:"pages/properties.html", li: " 资源管理"},
               {href:"pages/departments.html", li: " 部门管理"},
               {href:"pages/employees.html", li: " 员工管理"}
           ],
           subList2: [
               {href:"pages/infos.html", li: " 个人信息"},
               {href:"pages/passwords.html", li: " 密码修改"},
               {href:"pages/util/login.html", li: " 注销"}
           ]
       },
       created(){
           this.getIDAndName();
       },
       methods: {
           getIDAndName(){
             if(sessionStorage.getItem("userID") === null)
             {
                 location.href = "pages/util/login.html";
             }else {
                 this.userID = sessionStorage.getItem("userID").toString();
                 this.userName = sessionStorage.getItem("userName").toString();
                 this.userImageSrc = sessionStorage.getItem("userImageSrc").toString();
                 this.userClass = sessionStorage.getItem("userClass").toString();
                 this.userDepartment = sessionStorage.getItem("userDepartment").toString();
             }
           }

       }
   });
});